//
//  TTDiskCache.h
//  Tint
//
//  Created by Kevin Wu on 8/23/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TTCache.h"

@interface TTDiskCache : TTCache {
}

- (NSString *)newStringForKey:(NSString *)key;
- (NSString *)newStringForKey:(NSString *)key name:(NSString *)name;

- (NSData *)newDataForKey:(NSString *)key;
- (NSData *)newDataForKey:(NSString *)key name:(NSString *)name;



- (BOOL)setString:(NSString *)string forKey:(NSString *)key;
- (BOOL)setString:(NSString *)string forKey:(NSString *)key name:(NSString *)name;
- (BOOL)setString:(NSString *)string forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (BOOL)setString:(NSString *)string forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval name:(NSString *)name;

- (BOOL)setData:(NSData *)data forKey:(NSString *)key;
- (BOOL)setData:(NSData *)data forKey:(NSString *)key name:(NSString *)name;
- (BOOL)setData:(NSData *)data forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (BOOL)setData:(NSData *)data forKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval name:(NSString *)name;

- (BOOL)copyFileAtPath:(NSString *)filePath asKey:(NSString *)key;
- (BOOL)copyFileAtPath:(NSString *)filePath asKey:(NSString *)key name:(NSString *)name;
- (BOOL)copyFileAtPath:(NSString *)filePath asKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (BOOL)copyFileAtPath:(NSString *)filePath asKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval name:(NSString *)name;

- (BOOL)moveFileAtPath:(NSString *)filePath asKey:(NSString *)key;
- (BOOL)moveFileAtPath:(NSString *)filePath asKey:(NSString *)key name:(NSString *)name;
- (BOOL)moveFileAtPath:(NSString *)filePath asKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (BOOL)moveFileAtPath:(NSString *)filePath asKey:(NSString *)key withTimeoutInterval:(NSTimeInterval)timeoutInterval name:(NSString *)name;


- (int)totalCacheSize;
- (int)cacheSize;
- (int)cacheSizeOfName:(NSString *)name;

+ (NSString *)rootDirectory;
+ (NSString *)profilePath;
+ (NSString *)cacheRootDirectory:(NSString *)name;
+ (BOOL)createCacheRootDirectory:(NSString *)name;
+ (NSString *)cachePathForKey:(NSString *)key;
+ (NSString *)cachePathForKey:(NSString *)key name:(NSString *)name;

@end
